package com.realbrand.net.realbrandpay.zxing.util;

import android.util.Log;

/**
 * Created by Administrator on 2017/6/23.
 */

public class L {

    /**
     * 统一管理Log
     */
    private static final boolean DEBUG = true;

    public static final String TAG = "zhu";

    public static void d(String msg) {
        if (DEBUG) {
            Log.d(TAG, msg);
        }
    }

    public static void d(String tag, String msg) {
        if (DEBUG) {
            int max_str_length = 2001 - tag.length();
            //大于4000时
            while (msg.length() > max_str_length) {
                Log.i(tag, msg.substring(0, max_str_length));
                msg = msg.substring(max_str_length);
            }
            //剩余部分
            Log.i(tag, msg);
        }
    }
}

